function CameraController(la0, lo0)
{
	var moving = false, prevX = 0, prevY = 0, deltaX = 0, deltaY = 0, lat = (la0 ? la0 : 0), lon = (lo0 ? lo0 : 0);
	
	this.onmousemove = function(evt)
	{
		if(evt.ctrlKey)
		{
			if(moving)
			{
				deltaX += evt.x - prevX;
				deltaY += evt.y - prevY;
			} else
			{
				moving = true;
				deltaX = 0;
				deltaY = 0;
			}

			prevX = evt.x;
			prevY = evt.y;
		} else moving = false;
		
		return moving;
	}
	
	this.readreset = function(width, height)
	{
	    var sens = 3.0;
		var dx = deltaX, dy = deltaY;
		deltaX = 0;
		deltaY = 0;
		lat -= sens * dy / width;
		lon += sens * dx / height;
		return [lat, lon];
	}
}
